#include<stdio.h>
int main()
{
	int count = 0;


	for (int number = 1; number <= 1000; number++)
	{
		printf("%d", number);
		while (number != 0)
		{
			int rev = 0;
			int a = number % 10;
			number = number / 10;
			rev = rev + a;
			if (rev == 15)
			{
				count++;

			}
		}



	}

	printf("%d", count);


	return 0;
}